package program.commands;

import item.Robot;

/**
 * A class concerning move-commands: (move).
 *
 */
public class Move extends BasicCommand {
	
	/**
	 * Initialise this new move-command with a line number.
	 *
	 */
	public Move(int lineNb) {
		super(lineNb);
	}
	
	/**
	 * Returns a textual representation of this move-command, formatted in accordance with its position 
	 * in the program.
	 *
	 * @return	
	 * 			| result == getIndentation(indentationLevel) + "(move)"
	 */
	@Override
	public String prettyFormat(int indentationLevel) {
		return getIndentation(indentationLevel) + "(move)";
	}
	
	/**
	 * Execute the move method on the given robot.
	 *
	 * @effect	The given robot moves one position forward.
	 *                      | robot.move()
	 */
	@Override
	public void execute(Robot robot) throws IllegalArgumentException {
		super.execute(robot);
		robot.move();
	}
} 
